Chapter 1. An Abridged Introduction to Finance

Content


1.1 Financial Securities

1.1.1 Bonds and the Continuous Compounding of Interest Rates

Compounding the interest

Payoff and profit of bonds


1.1.2 Stocks: Trade, Price and Indices

Reading a stock quotes table

R Example 1.1

#install.packages("quantmod")
library(quantmod)
## Loading required package: xts
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## 
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
## 
## Loading required package: TTR
## Version 0.4-0 included new data defaults. See ?getSymbols.
# retrieve historical price data for General Electric Co. from Yahoo Finance
getSymbols('GE',src='yahoo', from="2000-01-01", to="2009-12-30")
##     As of 0.4-0, 'getSymbols' uses env=parent.frame() and
##  auto.assign=TRUE by default.
## 
##  This  behavior  will be  phased out in 0.5-0  when the call  will
##  default to use auto.assign=FALSE. getOption("getSymbols.env") and 
##  getOptions("getSymbols.auto.assign") are now checked for alternate defaults
## 
##  This message is shown once per session and may be disabled by setting 
##  options("getSymbols.warning4.0"=FALSE). See ?getSymbol for more details
## [1] "GE"
# to see headers of file (OHLCV type)
names(GE)
## [1] "GE.Open"     "GE.High"     "GE.Low"      "GE.Close"    "GE.Volume"  
## [6] "GE.Adjusted"
head(GE)
##            GE.Open GE.High GE.Low GE.Close GE.Volume GE.Adjusted
## 2000-01-03   153.0   153.7  149.2    150.0  22069800       31.67
## 2000-01-04   147.2   148.0  144.0    144.0  22121400       30.40
## 2000-01-05   143.8   147.0  142.6    143.8  27292800       30.35
## 2000-01-06   143.1   146.9  142.6    145.7  19873200       30.75
## 2000-01-07   148.0   151.9  147.0    151.3  20141400       31.94
## 2000-01-10   152.7   154.1  151.1    151.2  15226500       31.93
# extract Adjusted Close
geAdj = GE$GE.Adjusted["2000-01-01/2000-01-20"]
head(geAdj)
##            GE.Adjusted
## 2000-01-03       31.67
## 2000-01-04       30.40
## 2000-01-05       30.35
## 2000-01-06       30.75
## 2000-01-07       31.94
## 2000-01-10       31.93
# compute max, min and mean
max(geAdj); min(geAdj); mean(geAdj)
## [1] 32.46
## [1] 30.35
## [1] 31.45
# draw a chart
chartSeries(GE)

plot of chunk unnamed-chunk-1

Payoff and profit of stocks

Stock indices

Example 1.2 (A price weighted index)

The Dow Jones Industrial Average, conceived by Charles Dow and Edward Jones (1896), is computed by the following formula

Example 1.3 (A capitalization weighted index)

The Madrid Stock Exchange principal index, IBEX35, is computed by the following formula

Example 1.4 (Value Line Stock Index)

One of the most reputed market index, used as benchmark for American and Canadian stock markets, is the Value Line Index. This is a composite index of about 1,700 companies from the New York Stock Exchange, NASDAQ, AMEX, and the Toronto Stock Exchange. Originally launched in 1961, it is calculated as an equally weighted geometric average, the index VLIC. Then in 1988, an arithmetic average version for the same composition of stocks, the VLIA, was released. The formula for calculating the Value Line Geometric Index (VLIC) is

where VLIC_t stands for the value of the index at time t, C_i,_t is the current (or Close) price of stock i at time t , and n is the number of stocks. For the Value Line Arithmetic Index (VLIA), the formula with similar nomenclature is given by

Comparing the performance of two or more stocks

Example 1.5 As an example of using an index as benchmark for our investments


1.1.3 Options and Other Derivatives

Options

Reading an option quotes

Payoff and profit of options

Example 1.6

Example 1.7

The option pricing problem

Forward and futures contracts

Payoff and profit


1.1.4 Portfolios and Collective Investment

Mutual funds and ETF


1.2 Financial Engineering


1.2.1 Trading Positions and Attitudes

Long and short positions

Example 1.8 (A portfolio insurance strategy)

Suppose an investor is long on stocks from XYZ. Then to cover himself from possible losses, in the event that the price of the stock goes down, he can simultaneously enter into a long position on a put option (i.e. a long put) for similar amount of XYZ shares. In this way the investor is sure to sell part of the stock at the strike price of the put. For this strategy it is preferable to have the flexibility of an American put option.

Hedgers, speculators and arbitrageurs

Bulls and bears

Market timing or buy-and-hold


1.2.2 On Price and Value of Stocks. The Discounted Cash Flow model

<- market capitalization rate or cost of equity capital

Example 1.9

A simpler closed formula (perpetual growth formula)


##1.2.3 Arbitrage and Risk-Neutral Valuation Principle

Principle of No Arbitrage

Risk-neutral valuation

Another way to value an option can be derived from the assumption that investors are indifferent about risk. This is a strong hypothesis but make for doing pretty valuation. Observe that in a risk-neutral world all securities should behave much like a bond. Therefore, on the one hand, the rate of benefit that investors can expect from a stock should be equal to the risk-free rate, since they don’t care about risk. And on the other hand, the present value of a derivative can be obtained by calculating its expected future value, and discounting it back to present at the risk-free rate (cf. Eq. (1.7)).


1.2.4 The Efficient Market Hypothesis(EMH) and Computational Complexity


1.3 Notes, Computer Lab and Problems


1.3.1 Bibliographic remarks


1.3.2 Possibly the First Option Contract in History


1.3.3 On Short Selling


1.3.4 R Lab

symbols=c('VLIC','GE','KO','AAPL','MCD')
getSymbols(symbols,src='yahoo',from="2012-02-01",to="2013-02-01")
## [1] "VLIC" "GE"   "KO"   "AAPL" "MCD"
#obtain adjusted closed
VLICad = VLIC$VLIC.Adjusted; GEad= GE$GE.Adjusted;
KOad=KO$KO.Adjusted; AAPLad=AAPL$AAPL.Adjusted; MCDad = MCD$MCD.Adjusted
#compute cumulative sum (cumsum) of daily returns (Delt)
#Remove first term of the series, with [-1,],
#since cumsum is not defined for it.
vl = cumsum((Delt(VLICad)*100)[-1,])
ge = cumsum((Delt(GEad)*100)[-1,])
ko = cumsum((Delt(KOad)*100)[-1,])
ap = cumsum((Delt(AAPLad)*100)[-1,])
md = cumsum((Delt(MCDad)*100)[-1,])
###range of values for the plot
lim = c(min(vl,ge,ko,ap,md),max(vl,ge,ko,ap,md))
###the plot
plot(vl,main="",ylim=lim,xlab="dates",ylab="% benefits")
lines(ge,col="green"); lines(ko,col="red")
lines(ap,col="violet"); lines(md,col="yellow")
legend(x="topleft",cex=0.4,c("VLIC","GE","KO","AAPL","MCD"), lty=1, col=c("black","green","red","violet","yellow"))

plot of chunk unnamed-chunk-2

1.3.5 Research Problem


1.3.6 Problem (Simple Bounds on Calls and Puts)


1.3.7 Problem (More Strategies with Options)


1.3.8 Problem


1.3.9 Problem